/*--------------------------------------------------------------
 * File: demo62.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 使用结构体存储学生信息
 * Version 0.1
 * Date 2022-09-12 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
#include <stdio.h>

struct student
{
    char name[50];
    int roll; 
    float marks;
}s;

int main(int argc, char const *argv[])
{
    printf("输入信息：\n");
    printf("名字：");
    scanf("%s",s.name);

    printf("编号：");
    scanf("%d",&s.roll);

    printf("成绩：");
    scanf("%f",&s.marks);

    printf("显示信息：");
    printf("名字：%s, 编号：%d, 成绩：%f\n",s.name, s.roll, s.marks);

    return 0;
}

